

function generalHtml(){
    let body=document.querySelector('body')
    let header=_c('div')
    header.className='header'
    let img=_c('img')
    img.setAttribute('src','../assets/images/header_logo.png')
    header.appendChild(img)
    let img2=_c('img')
    img2.setAttribute('src','../assets/images/header_app.png')
    header.appendChild(img2)
    body.appendChild(header)
    let search=_c('div')
    search.className='search'
    let input=_c('input')
    input.setAttribute('type','text')
    input.setAttribute('value','请输入你想要的产品')
    search.appendChild(input)
    let button=_c('button')
    button.innerText='搜索'
    search.appendChild(button)
    body.appendChild(search)
    let container=_c('ul')
    container.className='container'
    body.appendChild(container)
    let more=_c('div')
    more.className='more'
    let moreA=_c('a')
    moreA.setAttribute('href','#')
    moreA.innerText='更多优惠信息>>>'
    more.appendChild(moreA)
    body.appendChild(more)
    let chart=_c('div')
    chart.className='chart'
    let chartspan=_c('span')
    chartspan.innerText='品牌排行'
    chart.appendChild(chartspan)
    let chartimg=_c('img')
    chartimg.setAttribute('src','../assets/images/more.png')
    chart.appendChild(chartimg)
    body.appendChild(chart)
    let nav=_c('div')
    nav.className='nav'
    let navdiv1=_c('div')
    navdiv1.innerText='登入'
    nav.appendChild(navdiv1)
    let navdiv2=_c('div')
    navdiv2.innerText='注册'
    nav.appendChild(navdiv2)
    let navdiv3=_c('div')
    navdiv3.innerText='返回顶部'
    nav.appendChild(navdiv3)
    body.appendChild(nav)
    let footer=_c('div')
    footer.className='footer'
    let footerdiv=_c('div')
    footerdiv.className='top'
    let footdiva1=_c('a')
    footdiva1.setAttribute('href','#')
    footdiva1.innerText='手机APP下载'
    footerdiv.appendChild(footdiva1)
    let footdiva2=_c('a')
    footdiva2.setAttribute('href','#')
    footdiva2.innerText='万锋智慧商城手机版'
    footerdiv.appendChild(footdiva2)
    let footdiva3=_c('a')
    footdiva3.setAttribute('href','#')
    footdiva3.innerText=' -- 掌上比价平台'
    footerdiv.appendChild(footdiva3)
    footer.appendChild(footerdiv)
    let p=_c('p')
    p.innerText='chst.vip:8081/crm'
    footer.appendChild(p)
    body.appendChild(footer)   
}
generalHtml()
function _c(selector){
    return document.createElement(selector)
}



function goback() {
    location.href = '../index.html'
}
$('.header>img').click(() => goback())
$('.section>img').click(() => goback())
$('.chart>img').click(() => goback())
$('.nav>div').eq(2).siblings().click(() => goback()).end().click(function () {
    $('html,body').animate({ scrollTop: 0 }, 500)
})